package cn.zhangyong.opengl20learn;

import android.content.Context;
import android.opengl.GLSurfaceView;

import cn.zhangyong.opengl20learn.baselearn1.Base1Render;

/**
 * 作者：<a href="http://www.cnblogs.com/baiqiantao">张勇</a><p>
 * 创建时间：2020/5/30 15:39 <p>
 * 描述：界面展示控件
 *
 * @author zy
 */
public class BaseSurfaceView extends GLSurfaceView {
    private final GLSurfaceView.Renderer render;

    public BaseSurfaceView(Context context) {
        this(context, null);
    }

    public BaseSurfaceView(Context context, GLSurfaceView.Renderer render) {
        super(context);
        if (render != null) {
            this.render = render;
        } else {
            this.render = new Base1Render();
        }
        setEGLContextClientVersion(2);
        setRenderer(this.render);
    }


}
